<template>
  <a-card :bordered="false">
    <detail-list :col="2" title="异动信息">
      <detail-list-item term="学号">{{ transferInfo.xh }}&emsp;</detail-list-item>
      <detail-list-item term="异动类型">{{ transferInfo.ydlbmc }}&emsp;</detail-list-item>
      <detail-list-item term="异动日期">{{ transferInfo.ydrq && transferInfo.ydrq.format('YYYY-MM-DD') }}&emsp;</detail-list-item>
      <detail-list-item term="异动原因">{{ transferInfo.ydyymc }}&emsp;</detail-list-item>
      <detail-list-item term="姓名">{{ transferInfo.yxm }}&emsp;</detail-list-item>
      <detail-list-item term="异动后姓名">{{ transferInfo.xxm }}&emsp;</detail-list-item>
      <detail-list-item term="性别">{{ transferInfo.yxbmc }}&emsp;</detail-list-item>
      <!-- <detail-list-item term="性别">{{ transferInfo.csrq && transferInfo.csrq.format('YYYY-MM-DD') }}&emsp;</detail-list-item> -->
      <detail-list-item term="异动后性别">{{ transferInfo.xxbmc }}&emsp;</detail-list-item>
      <detail-list-item term="出生日期">{{ transferInfo.ycsrq && transferInfo.ycsrq.format('YYYY-MM-DD') }}&emsp;</detail-list-item>
      <detail-list-item term="异动后出生日期">{{ transferInfo.xcsrq && transferInfo.xcsrq.format('YYYY-MM-DD') }}&emsp;</detail-list-item>
      <detail-list-item term="证件类型">{{ transferInfo.yzjlxmc }}&emsp;</detail-list-item>
      <detail-list-item term="异动后证件类型">{{ transferInfo.xzjlxmc }}&emsp;</detail-list-item>
      <detail-list-item term="证件号码">{{ transferInfo.yzjhm }}&emsp;</detail-list-item>
      <detail-list-item term="异动后证件号码">{{ transferInfo.xzjhm }}&emsp;</detail-list-item>
      <detail-list-item term="异动前院系">{{ transferInfo.yyxsmc }}&emsp;</detail-list-item>
      <detail-list-item term="异动后院系">{{ transferInfo.xyxsmc }}&emsp;</detail-list-item>
      <detail-list-item term="异动前专业">{{ transferInfo.yzymc }}&emsp;</detail-list-item>
      <detail-list-item term="异动后专业">{{ transferInfo.xzymc }}&emsp;</detail-list-item>
      <detail-list-item term="异动前导师">{{ transferInfo.ydsmc }}&emsp;</detail-list-item>
      <detail-list-item term="异动后导师">{{ transferInfo.xdsmc }}&emsp;</detail-list-item>
      <detail-list-item term="异动前第二导师">{{ transferInfo.ydedsmc }}&emsp;</detail-list-item>
      <detail-list-item term="异动后第二导师">{{ transferInfo.xdedsmc }}&emsp;</detail-list-item>
      <detail-list-item term="异动前培养层次">{{ transferInfo.ypyccmc }}&emsp;</detail-list-item>
      <detail-list-item term="异动后培养层次">{{ transferInfo.xpyccmc }}&emsp;</detail-list-item>
      <detail-list-item term="异动前学制">{{ transferInfo.yxz }}&emsp;</detail-list-item>
      <detail-list-item term="异动后学制">{{ transferInfo.xxz }}&emsp;</detail-list-item>
      <detail-list-item term="异动前学籍状态">{{ transferInfo.yxjztmc }}&emsp;</detail-list-item>
      <detail-list-item term="异动后学籍状态">{{ transferInfo.xxjztmc }}&emsp;</detail-list-item>
      <detail-list-item term="当前所在年级">{{ transferInfo.ynj }}&emsp;</detail-list-item>
      <detail-list-item term="异动后所在年级">{{ transferInfo.xnj }}&emsp;</detail-list-item>
      <detail-list-item term="异动前毕业年月">{{ transferInfo.ybyny && transferInfo.ybyny.format('YYYY-MM-DD') }}&emsp;</detail-list-item>
      <detail-list-item term="异动后毕业年月">{{ transferInfo.xbyny && transferInfo.xbyny.format('YYYY-MM-DD') }}&emsp;</detail-list-item>
      <detail-list-item term="异动备注">{{ transferInfo.note }}&emsp;</detail-list-item>
      <detail-list-item term="审核说明">{{ transferInfo.shsm }}&emsp;</detail-list-item>
    </detail-list>
    <!-- <a-row style="margin:10px 0;color:rgba(0,0,0,.85)">指导专业及研究方向：</a-row>
    <a-row>
      <span style="color:rgba(0,0,0,.85)">指导专业：</span>{{ transferInfo.zdzymc }} <br/>
      <span style="color:rgba(0,0,0,.85)">研究方向：</span>{{ transferInfo.yjfxmc }}
    </a-row>
    <a-row style="margin:10px 0;color:rgba(0,0,0,.85)">导师简介：</a-row>
    <a-row>{{ transferInfo.dsjj }}</a-row>
     -->
     <a-row style="text-align: center;">
      <a-button type="primary" @click="$router.back()">返回</a-button>
    </a-row>
  </a-card>
</template>

<script>
import DetailList from '~/tool/DetailList'
const DetailListItem = DetailList.Item

export default {
  data () {
    return {
      transferInfo: {}
    }
  },
  components: {
    DetailList,
    DetailListItem
  },
  created () {
    this.$api.student.transferingInfoById(this.$route.query.id).then(res => {
      this.transferInfo = res.data
      // for (const key in res.data) {
      //   if (['xcsrq', 'xbyny', 'ydrq'].includes(key)) {
      //     res.data[key] = moment(res.data[key])
      //   }
      // }
      // res.data.ydyym = +res.data.ydyym
      // if (res.data.xyxsh) {
      //   this.$api.base.majorAll({lsdwh: res.data.xyxsh}).then(res => {
      //     this.$set(this.selectMenu, 'xzy', res.data)
      //   })
      //   this.$api.student.tutorByStu({yxm: res.data.xyxsh, zym: res.data.xzyh}).then(res => {
      //     this.$set(this.selectMenu, 'tutor', res.data)
      //   })
      // }
      // if (res.data.xbyny) {
      //   res.data.xbyny = res.data.xbyny.format('YYYY-MM-DD')
      // }
      this.$nextTick(() => {
        // this.form.setFieldsValue(res.data)
        // if (res.data.xyxsh) {
        //   this.yxChange(res.data.xyxsh)
        // }
        // if (res.data.ydlbm) {
        //   this.ydlbChange(res.data.ydlbm, true)
        // }
      })
    })
  },
  methods: {
    exportPdf () {
      let fileName = this.transferInfo.xm + '_导师详细信息.pdf'
      this.$downloadPdf('/teacher/dsxx/dsPirnt/' + this.transferInfo.gh, {}, fileName)
    }
  }
}
</script>

<style>

</style>
